<template>
  <div class="match_like_list table-theme">
    <el-breadcrumb separator="/">
      <el-breadcrumb-item>搭配--搭配点赞列表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card>
      <p style="text-align: right; line-height: 30px">总列表数：{{ total2 }}</p>
      <el-table :data="list2" stripe>
        <el-table-column
          label="序号"
          align="center"
          prop="user_id"
        ></el-table-column>
        <el-table-column label="头像" align="center" width="80">
          <template slot-scope="scope">
            <el-image
              :src="scope.row.heard_img"
              style="width: 50px; height: 50px; vertical-align: top"
            ></el-image>
          </template>
        </el-table-column>
        <el-table-column
          label="用户名"
          align="center"
          prop="nickname"
        ></el-table-column>
        <el-table-column
          label="时间"
          align="center"
          prop="add_time"
        ></el-table-column>
      </el-table>
      <div class="pages">
        <el-pagination
          background
          layout="prev, pager, next, jumper"
          :total="total2"
          @current-change="init"
          :current-page="page2"
          :page-size="30"
        ></el-pagination>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  props: {
    id: {
      type: Number,
      default: 0,
    },
  },
  data() {
    return {
      total2: 0,
      list2: [],
      page2: 0,
      size2: 10,
    };
  },
  methods: {
    init(e) {
      let data = {
        page: e - 1 ? e - 1 : 0,
        limit: this.size2,
        match_id: this.id,
      };
      this.$http(this.$ApiList.LikeList, data).then((res) => {
        this.total2 = res.counts;
        this.list2 = res.datas;
      });
    },
    goSearch() {},
    refreshPage() {},
  },
  created() {
    this.init();
  },
};
</script>

<style lang="scss" scoped>
.match_like_list{
  width: 100%;
}

</style>